#ifndef SVMIO
#define SVMIO

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <map>
#include <string>
#include <iostream>
#include <svmCommon.h>


enum Parameters { p_gamma, p_coef0, p_degree, p_rho, p_kernel_type, p_svm_type, p_nr_class, p_total_sv, p_label, p_nr_sv, p_SV };

float readFloat(FILE* input);

int readModel(const char* filename, float** alpha, float** supportVectors, int* nSVOut, int* nDimOut, KernelParams* kp, float* p_class1Label, float* p_class2Label);

int readSvm(const char* filename, float** pData, float** pLabels, int* pNPoints, int* pDimension, float** pTransposedData = NULL);

void printModel(const char* outputFile, KernelParams kp, float* alpha, float* labels, float* data, int nPoints, int nDimension, float epsilon);

void printClassification(const char* outputFile, float* result, int nPoints);

#endif
